//
//	ExtentionList.m
//
//	Create by mafeng on 9/8/2016
//	Copyright © 2016. All rights reserved.
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "ExtentionList.h"

NSString *const kExtentionListAreaid = @"areaid";
NSString *const kExtentionListAreaidCxzs = @"areaid_cxzs";
NSString *const kExtentionListIdField = @"id";
NSString *const kExtentionListImg = @"img";
NSString *const kExtentionListIshavead = @"ishavead";
NSString *const kExtentionListJumptype = @"jumptype";
NSString *const kExtentionListJumpurl = @"jumpurl";
NSString *const kExtentionListPvid = @"pvid";
NSString *const kExtentionListRdposturl = @"rdposturl";
NSString *const kExtentionListSeriesid = @"seriesid";
NSString *const kExtentionListSeriesname = @"seriesname";
NSString *const kExtentionListThirdadurl = @"thirdadurl";
NSString *const kExtentionListThurl = @"thurl";
NSString *const kExtentionListUrl = @"url";

@interface ExtentionList ()
@end
@implementation ExtentionList




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kExtentionListAreaid] isKindOfClass:[NSNull class]]){
		self.areaid = dictionary[kExtentionListAreaid];
	}

	if(![dictionary[kExtentionListAreaidCxzs] isKindOfClass:[NSNull class]]){
		self.areaidCxzs = dictionary[kExtentionListAreaidCxzs];
	}

	if(![dictionary[kExtentionListIdField] isKindOfClass:[NSNull class]]){
		self.idField = dictionary[kExtentionListIdField];
	}

	if(![dictionary[kExtentionListImg] isKindOfClass:[NSNull class]]){
		self.img = dictionary[kExtentionListImg];
	}	
	if(![dictionary[kExtentionListIshavead] isKindOfClass:[NSNull class]]){
		self.ishavead = dictionary[kExtentionListIshavead];
	}

	if(![dictionary[kExtentionListJumptype] isKindOfClass:[NSNull class]]){
		self.jumptype = dictionary[kExtentionListJumptype];
	}

	if(![dictionary[kExtentionListJumpurl] isKindOfClass:[NSNull class]]){
		self.jumpurl = dictionary[kExtentionListJumpurl];
	}	
	if(![dictionary[kExtentionListPvid] isKindOfClass:[NSNull class]]){
		self.pvid = dictionary[kExtentionListPvid];
	}	
	if(![dictionary[kExtentionListRdposturl] isKindOfClass:[NSNull class]]){
		self.rdposturl = dictionary[kExtentionListRdposturl];
	}	
	if(![dictionary[kExtentionListSeriesid] isKindOfClass:[NSNull class]]){
		self.seriesid = dictionary[kExtentionListSeriesid];
	}

	if(![dictionary[kExtentionListSeriesname] isKindOfClass:[NSNull class]]){
		self.seriesname = dictionary[kExtentionListSeriesname];
	}	
	if(![dictionary[kExtentionListThirdadurl] isKindOfClass:[NSNull class]]){
		self.thirdadurl = dictionary[kExtentionListThirdadurl];
	}	
	if(![dictionary[kExtentionListThurl] isKindOfClass:[NSNull class]]){
		self.thurl = dictionary[kExtentionListThurl];
	}	
	if(![dictionary[kExtentionListUrl] isKindOfClass:[NSNull class]]){
		self.url = dictionary[kExtentionListUrl];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	dictionary[kExtentionListAreaid] = self.areaid;
	dictionary[kExtentionListAreaidCxzs] = self.areaidCxzs;
	dictionary[kExtentionListIdField] = self.idField;
	if(self.img != nil){
		dictionary[kExtentionListImg] = self.img;
	}
	dictionary[kExtentionListIshavead] = self.ishavead;
	dictionary[kExtentionListJumptype] = self.jumptype;
	if(self.jumpurl != nil){
		dictionary[kExtentionListJumpurl] = self.jumpurl;
	}
	if(self.pvid != nil){
		dictionary[kExtentionListPvid] = self.pvid;
	}
	if(self.rdposturl != nil){
		dictionary[kExtentionListRdposturl] = self.rdposturl;
	}
	dictionary[kExtentionListSeriesid] = self.seriesid;
	if(self.seriesname != nil){
		dictionary[kExtentionListSeriesname] = self.seriesname;
	}
	if(self.thirdadurl != nil){
		dictionary[kExtentionListThirdadurl] = self.thirdadurl;
	}
	if(self.thurl != nil){
		dictionary[kExtentionListThurl] = self.thurl;
	}
	if(self.url != nil){
		dictionary[kExtentionListUrl] = self.url;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.areaid forKey:kExtentionListAreaid];	[aCoder encodeObject:self.areaidCxzs forKey:kExtentionListAreaidCxzs];	[aCoder encodeObject:self.idField forKey:kExtentionListIdField];	if(self.img != nil){
		[aCoder encodeObject:self.img forKey:kExtentionListImg];
	}
	[aCoder encodeObject:self.ishavead forKey:kExtentionListIshavead];	[aCoder encodeObject:self.jumptype forKey:kExtentionListJumptype];	if(self.jumpurl != nil){
		[aCoder encodeObject:self.jumpurl forKey:kExtentionListJumpurl];
	}
	if(self.pvid != nil){
		[aCoder encodeObject:self.pvid forKey:kExtentionListPvid];
	}
	if(self.rdposturl != nil){
		[aCoder encodeObject:self.rdposturl forKey:kExtentionListRdposturl];
	}
	[aCoder encodeObject:self.seriesid forKey:kExtentionListSeriesid];	if(self.seriesname != nil){
		[aCoder encodeObject:self.seriesname forKey:kExtentionListSeriesname];
	}
	if(self.thirdadurl != nil){
		[aCoder encodeObject:self.thirdadurl forKey:kExtentionListThirdadurl];
	}
	if(self.thurl != nil){
		[aCoder encodeObject:self.thurl forKey:kExtentionListThurl];
	}
	if(self.url != nil){
		[aCoder encodeObject:self.url forKey:kExtentionListUrl];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.areaid = [aDecoder decodeObjectForKey:kExtentionListAreaid];
	self.areaidCxzs = [aDecoder decodeObjectForKey:kExtentionListAreaidCxzs];
	self.idField = [aDecoder decodeObjectForKey:kExtentionListIdField];
	self.img = [aDecoder decodeObjectForKey:kExtentionListImg];
	self.ishavead = [aDecoder decodeObjectForKey:kExtentionListIshavead] ;
	self.jumptype = [aDecoder decodeObjectForKey:kExtentionListJumptype];
	self.jumpurl = [aDecoder decodeObjectForKey:kExtentionListJumpurl];
	self.pvid = [aDecoder decodeObjectForKey:kExtentionListPvid];
	self.rdposturl = [aDecoder decodeObjectForKey:kExtentionListRdposturl];
	self.seriesid = [aDecoder decodeObjectForKey:kExtentionListSeriesid] ;
	self.seriesname = [aDecoder decodeObjectForKey:kExtentionListSeriesname];
	self.thirdadurl = [aDecoder decodeObjectForKey:kExtentionListThirdadurl];
	self.thurl = [aDecoder decodeObjectForKey:kExtentionListThurl];
	self.url = [aDecoder decodeObjectForKey:kExtentionListUrl];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	ExtentionList *copy = [ExtentionList new];

	copy.areaid = self.areaid;
	copy.areaidCxzs = self.areaidCxzs;
	copy.idField = self.idField;
	copy.img = [self.img copyWithZone:zone];
	copy.ishavead = self.ishavead;
	copy.jumptype = self.jumptype;
	copy.jumpurl = [self.jumpurl copyWithZone:zone];
	copy.pvid = [self.pvid copyWithZone:zone];
	copy.rdposturl = [self.rdposturl copyWithZone:zone];
	copy.seriesid = self.seriesid;
	copy.seriesname = [self.seriesname copyWithZone:zone];
	copy.thirdadurl = [self.thirdadurl copyWithZone:zone];
	copy.thurl = [self.thurl copyWithZone:zone];
	copy.url = [self.url copyWithZone:zone];

	return copy;
}
@end
